﻿using Orchard.ContentManagement;
using Orchard.ContentManagement.Records;
using Orchard.Environment.Extensions;

namespace ATTools.Models
{
    [OrchardFeature("ATTools")]
    public class SoundRecord : ContentPartRecord
    {
        /// <summary>
        /// The path to the sound file.
        /// </summary>
        public virtual string SoundString { get; set; }

        /// <summary>
        /// Use the custom sound or not.
        /// </summary>
        public virtual bool UseCustomSound { get; set; }

        /// <summary>
        /// The path to the custom soundd file.
        /// </summary>
        public virtual string CustomSoundString { get; set; }

        /// <summary>
        /// The launguage of the sound file.
        /// </summary>
        public virtual string LanguageOfSound { get; set; }
    }

    [OrchardFeature("ATTools")]
    public class SoundPart : ContentPart<SoundRecord>
    {
        public string SoundString
        {
            get { return Record.SoundString; }
            set { Record.SoundString = value; }
        }

        public bool UseCustomSound
        {
            get { return Record.UseCustomSound; }
            set { Record.UseCustomSound = value; }
        }

        public string CustomSoundString
        {
            get { return Record.CustomSoundString; }
            set { Record.CustomSoundString = value; }
        }

        public string LanguageOfSound
        {
            get { return Record.LanguageOfSound; }
            set { Record.LanguageOfSound = value; }
        }

    }
}